package com.cwd.arm.domain.repository;

import com.cwd.arm.domain.entity.*;

import java.util.List;

/**
 * Description:项目
 * Created on 2021年11月16日
 *
 * @author yan
 */
public interface ProjectRepository {

    Long save(ProjectEntity entity);

    void update(ProjectEntity entity);

    void del(Long id);

    void addNode(ProjectEntity entity, List<ReceiveNodeEntity> receiveNodeEntityList);

    void updateNode(ProjectEntity entity, ReceiveNodeEntity oldReceiveNodeEntity,ReceiveNodeEntity receiveNodeEntity);

    void delNode(ProjectEntity entity, ReceiveNodeEntity receiveNodeEntity);

    void addConfirmIncome(ProjectEntity entity, ConfirmIncomeEntity confirmIncomeEntity);

    void updateConfirmIncome(ProjectEntity entity, ConfirmIncomeEntity oldConfirmIncomeEntity, ConfirmIncomeEntity newConfirmIncomeEntity);

    void delConfirmIncome(ProjectEntity entity, ConfirmIncomeEntity confirmIncomeEntity);

    void addPay(ProjectEntity entity, PayEntity payEntity);

    void updatePay(ProjectEntity entity, PayEntity oldPayEntity, PayEntity newPayEntity);

    void delPay(ProjectEntity entity, PayEntity PayEntity);

    /**
     * 计算收款周期
     * @param id
     */
    void updateReceiveCycle(Long id);

    ProjectEntity buildProjectEntity(Long id);

}


